Computer systems generally have several levels of memory; each level of memory can provide differing levels of speed, memory capacity, physical size, power requirements, voltage levels and/or volatility. These aspects are often at odds with each other. For example, increases in speed often lead to corresponding increases in power requirements. For this reason, many systems use a variety of different memories within the same system. From the perspective of a processor executing a computer program, these memories are often hidden in the sense that common data is temporarily cached in smaller and faster memory circuits. This common data is mapped to larger and slower memory circuits, which are accessed when the faster memory does not contain the desired data. The common data, if changed in the cached memory, can eventually be written to the larger and slower memory circuits. This allows for the access time of slow memory circuits to be hidden so long as the faster memory circuits contain the appropriately mapped data.
Computer systems generally contain some type of data storage device for providing mass-storage memory that is able to retain stored data when the computer system is powered down. This type of memory is referred to as nonvolatile memory because it is able to maintain data integrity in the absence of electrical power. Nonvolatile memory, however, can be slower by orders of magnitude relative to various volatile memories. Yet, nonvolatile memory can also be less expensive (per unit of memory capacity) and/or less power hungry. A common type of nonvolatile data-storage device is a hard disc drive (HDD) that uses a rotating magnetic storage media. HDDs are used for home-computers, servers, workstations, consumer-electronics and various other devices. Under normal operation, a computer system transfers data requiring nonvolatile retention from temporary memory to a HDD before the computer system is powered down. This allows for the data to be retained after the power is removed from the computer system. When the computer system is subsequently powered up, this data can be accessed and used by the computer system.
HDDs with rotating magnetic media have been in use for many years and have undergone various improvements including efficiency, reliability and data storage capacity. Various applications, however, are beginning to use other types of nonvolatile memory with more frequency. Solid State Drives/Devices (SSDs), using electronic nonvolatile memory (e.g., flash), are one such type of device, and are attractive for many applications. Speed, cost and power requirements factor into the selection of data storage devices such as SSDs or HDDs.
SSDs are attractive for many applications including those more traditionally associated with HDDs. HDDs use moving parts to access the storage medium. Thus, they often have slow data access time and lower power consumption compared to SSDs. One type of SSD uses nonvolatile NAND flash memory to store data. Flash memory is also used for handheld devices for which space and/or power requirements are at a premium. Generally, SSDs are not as susceptible to issues relating to physical shock and vibration. In an HDD, such movements can degrade performance by interrupting accesses to the rotating media. Thus, HDDs often include various mechanisms to compensate for mechanical shocks. Speed, cost and power requirements also factor into the selection of SSDs or HDDs.
While SSDs exhibit various desirable characteristics as relative, for example, to HDDs, the implementation of SSDs remains challenging and in many cases SSDs have not yet replaced HDDs. For example, NAND flash chips contain storage cells that wear out as the cells are erased and reprogrammed (written). This leads to the desire to minimize the number of erase and write cycles within the flash devices. Conventional NAND flash chips typically erase data in blocks and program data in pages, where a block is larger than a page. For example, a page might be 4K bytes, while an erase block might be 256K bytes. Packets of data received from a host into a data storage device are typically received as one or more logical blocks. 512-byte logical blocks are a popular size. Since the NAND flash chips used in some SSDs may contain erase and page block sizes that do not match the sizes of data being written by the host system, it is often desirable to temporarily contain the data for write commands in volatile memory (cache it) until additional write data is received. Frequently, this will be done until the sum of the total data to be written equals or surpasses the size of a page or an erase block. In this manner, multiple host writes are coalesced into a single page write operation.
Retaining unwritten data in volatile memory can be hazardous to data integrity under power failure conditions. Backup power supplies are frequently used to protect against loss of power, allowing the device to store unwritten data in nonvolatile memory in the event of power loss. Unfortunately, the power-delivering capabilities of various backup power supplies can degrade over time. If the backup power supply degrades significantly, it may become insufficient to ensure that all pertinent data is written from the volatile memory circuit during a power-loss event.
Aspects of the present invention, although not limited thereto, can be appreciated in the context of such data storage devices providing mass-memory.